/* purgecss start ignore */
@tailwind base;

@tailwind components;
body {
  font-family: -apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Roboto,
    PingFang SC, Hiragino Sans GB, Source Han Sans SC, Noto Sans CJK SC,
    Microsoft YaHei, WenQuanYi Micro Hei, WenQuanYi Zen Hei, Helvetica Neue,
    Arial, sans-serif;
}
.menu-item > {
  a {
    @apply px-6 py-2 block;
  }
}
.iconfont.social-icon {
  font-size: 14.5px;
}
footer {
  @apply pb-2;
}

.footer-social-links {
  @apply px-6;
  > a {
    @apply mr-2;
  }
}
.footer-custom,
.theme-brand {
  @apply px-6 text-gray-700 font-light;
  font-size: 13px;
}
.social-links {
  @apply px-5 pb-4;
}
.social-item > a {
  @apply px-2;
}
@screen sm {
  .menu-item > {
    a {
      @apply px-5 py-2;
    }
  }
  .menu-title {
    @apply hidden;
  }
  .social-links {
    padding: 0;
  }
}

@screen md {
  .menu-item {
    @apply text-center;
  }
}

@screen lg {
  .menu-item {
    @apply text-left;

    > a {
      @apply my-1 mx-2 px-4 py-2;
    }
  }
  .menu-title {
    @apply inline;
  }
}

.archive-list,
.category-list,
.tag-list {
  @apply leading-relaxed py-1 font-normal;
  li::before {
    color: #ccc;
    content: "▪";
    @apply text-xs;
    margin-right: 6px;
    transition: 0.2s ease;
  }
  .tag-list-count,
  .archive-list-count,
  .category-list-count {
    @apply text-gray-600 text-xs ml-1;
    &::before {
      content: "(";
    }

    &::after {
      content: ")";
    }
  }
  .tag-list-link {
    @apply text-base;
  }
}

.tagcloud {
  @apply text-sm;
  a {
    @apply inline-block m-1 leading-tight bg-gray-300 px-2 py-1 text-center whitespace-nowrap rounded-sm;
  }
}

.widget,
#toc {
  @apply mb-2;
  .widget-title,
  .toc-title {
    @apply font-semibold mb-1;
  }
}

#toc {
  .toc-link {
    @apply leading-snug;
  }
  .toc-child {
    @apply ml-4;
  }
  .toc-item {
    @apply pb-1;
  }
}

.widgets,
.toc-sidebar {
  @apply px-8 py-6 overflow-auto h-full;
  scrollbar-width: none;

  &::-webkit-scrollbar {
    display: none;
  }
  .links-widget,
  .skill-widget,
  .works-widget,
  .labels-widget,
  .projects-widget {
    @apply text-sm leading-relaxed text-gray-900;
  }
}

.aside-fixture {
  @apply hidden top-0 bottom-0 right-0 h-full;
}

@screen sm {
  .aside-fixture {
    @apply block w-64;
  }
  .header-fixture {
    @apply w-1/12;
  }
  .main-section {
    margin-left: 8.333%;
    max-width: 56%;
  }
  .header {
    @apply inset-y-0 left-0;
  }
}

@screen md {
  .aside-fixture {
    @apply w-1/3;
  }
}

@screen lg {
  .aside-fixture {
    @apply w-1/5;
  }
  .header-fixture {
    @apply w-1/6;
  }
  .main-section {
    margin-left: 16.667%;
    max-width: 62.333%;
  }
}

.aside {
  @apply fixed bg-gray-100 z-30;
}

.header-fixture {
  @apply top-0;
}

.header {
  @apply fixed inset-x-0  h-auto bg-gray-100 z-30;
}
.side-placeholder {
  @apply bottom-0 h-full inline-block;
}

.recent-post {
  @apply mb-2;
  .item-category {
    @apply font-medium text-indigo-600;
    font-size: 1.125rem;
  }
  .item-title {
    @apply leading-normal;
  }
  .item-date {
    @apply text-gray-600 text-xs;
  }
}

.article-meta {
  @apply text-gray-700;
  .iconfont {
    font-size: 13px;
  }
  > {
    span {
      @apply mr-2;
    }
  }
  .post-wordcount,
  .post-readcount {
    @apply hidden;
  }
  @screen sm {
    .post-wordcount,
    .post-readcount {
      @apply inline;
    }
  }
}

.article-header {
  @apply mt-2;
  h1 {
    @apply text-3xl font-medium;
  }
  p {
    @apply mt-1 mb-4;
  }
}

.year-archive {
  @apply py-2;
  header {
    @apply mb-2;
    h1 {
      @apply text-xl text-indigo-600;
    }
  }
  .archive-content {
    .post-item {
      @apply flex leading-loose pb-1;
      div {
        @apply mr-3;
      }
      .post-time {
        @apply text-gray-600;
      }
    }
  }
}

.repos {
  @apply grid grid-cols-1  gap-y-5 gap-x-8;

  .repo {
    @apply px-3 py-1 relative shadow-lg;
    min-height: 10rem;
    header {
      @apply mb-2  py-1;
    }

    &-title {
      @apply text-xl font-semibold;
    }

    &-body {
      @apply text-gray-700 my-2 leading-relaxed break-all text-sm;
    }

    &-meta {
      @apply absolute bottom-0 mb-2 w-full;
    }
    &-meta-inner {
      @apply text-right mr-8 text-gray-700;
    }
    &-lang {
      @apply float-left;
    }
    &-star,
    &-fork {
      @apply mr-2;
    }
  }
}

@screen md {
  .repos {
    @apply grid-cols-2;
  }
}

@screen lg {
  .repos {
    @apply grid-cols-3;
  }
}

.marked-body {
  @apply leading-relaxed;
  h1 {
    @apply text-3xl;
  }
  h2 {
    @apply text-2xl;
  }
  h3 {
    @apply text-xl;
  }
  h4 {
    @apply text-lg;
  }
  h5 {
    @apply text-base;
  }
  h6 {
    @apply text-sm;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    @apply font-bold my-4 pb-1 border-b border-gray-200;
  }
  p {
    @apply text-base text-gray-800 mb-3;
  }

  ul,
  ol {
    @apply ml-4;
  }
  ul {
    @apply list-disc mb-3;
  }
  ul {
    @apply text-gray-800;
  }
  ol {
    @apply list-decimal;
  }
  a {
    @apply text-indigo-600 no-underline;
  }
  code {
    @apply text-gray-800 bg-gray-200 rounded-sm;
    padding: 0.15em 0.2em 0.1em;
  }
  blockquote {
    @apply bg-gray-200 px-6 py-5 border-l-8 border-gray-400 my-4;
    footer {
      cite {
        @apply ml-3;
      }
    }
  }
  table {
    @apply border;
    td,
    th {
      @apply px-4 py-2 border;
    }
    tr:nth-child(even) {
      @apply bg-gray-200;
    }
  }
}

blockquote.copyright {
  @apply bg-gray-200 px-6 py-5 border-indigo-200 border-l-8 my-4 mt-8;
  > p:not(:last-child) {
    @apply pb-1;
  }
}

.highlight {
  @apply relative rounded-sm;
  padding: 32px 10px 0 10px !important;
  background: #fafafa;
  .gutter {
    @apply select-none;
  }
}
.highlight,
pre {
  @apply bg-gray-200;
  margin: 10px 0;
  padding: 15px 10px;
  font-size: 13px;
  color: #4d4d4c;
  line-height: 1.5;
}

.highlight:before {
  @apply bg-gray-300;
  display: block;
  content: " ";
  height: 32px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0 10px;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}
.gist-data {
  .highlight:after {
    @apply hidden;
  }
  .highlight:before {
    background-color: unset;
  }
}

.highlight:after {
  content: " ";
  position: absolute;
  border-radius: 50%;
  background: #fc625d;
  width: 10px;
  height: 10px;
  top: 0;
  left: 15px;
  margin-top: 11px;
  -webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
  box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
}

.highlight pre {
  border: none;
  margin: 0;
}

.highlight table {
  position: relative;
  border: none;
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
  overflow: auto;
  scrollbar-width: thin;
  &::-webkit-scrollbar {
    height: 8px;
    background-color: #e6e6e6;
  }
  &::-webkit-scrollbar-thumb {
    background-color: #cccccc;
    @apply rounded;
  }
  &::-webkit-scrollbar-track-piece {
    background-color: #f2f2f2;
  }
}

.highlight tr {
  border: none;
}

.highlight td,
.highlight th {
  border: none;
  padding: 0 !important;
}

.highlight td.code,
.highlight th.code {
  width: 100% !important;
}

.highlight figcaption {
  font-size: 0.85em;
  color: #8e908c;
  line-height: 1em;
  margin-bottom: 1em;
}

.highlight figcaption a {
  float: right;
}

.highlight .line {
  height: 24px;
  line-height: 24px;
}
.highlight .line.marked {
  @apply bg-indigo-200;
}

.highlight .gutter pre {
  text-align: right;
  padding-right: 0;
  padding-left: 0;
  color: #ccc;
}

a[href]:hover {
  @apply text-indigo-600;
}

#search-view-container {
  @apply fixed z-50;
  width: 95vw;
  margin: auto;
  left: 0;
  right: 0;
  top: 0;
  margin-top: 20vh;
}

@screen lg {
  #search-view-container {
    width: 45vw;
  }
}

.search-result {
  overflow: auto;
  max-height: 30rem;
  .result-item {
    .icon-file {
      @apply text-lg mr-2;
    }
  }
  scrollbar-width: thin;
  &::-webkit-scrollbar {
    height: 8px;
    background-color: #e6e6e6;
  }
  &::-webkit-scrollbar-thumb {
    background-color: #f2f2f2;
    @apply rounded;
  }
  &::-webkit-scrollbar-track-piece {
    background-color: #cccccc;
  }
}

#search-input:hover {
  cursor: inherit;
}

.code {
  .string {
    color: rgb(16, 114, 18);
  }
  .keyword {
    color: rgb(0, 27, 170);
  }
  .number {
    color: rgb(153, 0, 85);
  }
  .literal {
    color: rgb(175, 0, 85);
  }
  .comment {
    @apply text-gray-600;
  }
  .attr {
    color: #0b258d;
  }
  .built_in,
  .variable {
    color: #6b12b4;
  }
  .meta {
    color: #730909;
  }
  .section {
    color: #973f14;
  }
}

.gt-no-init p {
  @apply mb-2;
}

main {
  .content {
    @apply pb-8 mb-1;
  }
}

/* purgecss end ignore */
@tailwind utilities;
